const path = require('path');
const express = require('express');
const logger = require('morgan');

const pandaRouter = require('./routes/panda.js');
const loongRouter = require('./routes/loong.js');

const port = 3000;
const app = express();

app.use( logger('dev') );
app.use( express.static(path.join(__dirname, 'public')) );
app.use( express.urlencoded({ extended: false }) );
app.use( express.json() );

app.use( pandaRouter );
app.use( loongRouter );

app.listen( port, ()=> console.log(`正在监听${port}端口`) );